@layout("/common/_container.html",{js:["/assets/vocReducingPlan/vocReducingPlan.js"]}){

<div class="layui-body-header">
    <span class="layui-body-header-title">VOCs综合减排措施管理</span>
</div>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="layui-form toolbar">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <input id="condition" class="layui-input" type="text" placeholder="名称"/>
                            </div>
                            <div class="layui-inline">
                                <button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon">&#xe615;</i>搜索</button>
                                 @if(shiro.hasPermission("/vocReducingPlan/add")){
                                <button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon">&#xe654;</i>添加</button>
                                @}
                            </div>
                        </div>
                    </div>
                    <table class="layui-table" id="vocReducingPlanTable" lay-filter="vocReducingPlanTable"></table>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/html" id="tableBar">
    @if(shiro.hasPermission("/vocReducingPlan/edit")){
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">修改</a>
    @}

    <!--全选-->
    {{#  if(d.planType.length == 6){ }}
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="sourceEdit">源头替代</a>
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="processEdit">过程控制</a>
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="terminalEdit">末端治理</a>
    {{#  }  }}

    <!--选一个-->
    {{#  if(d.planType.length == 2){ }}
    {{#  if(d.planType == '1,'){ }}
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="sourceEdit">源头替代</a>
    {{#  }  }}
    {{#  if(d.planType == '2,'){ }}
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="processEdit">过程控制</a>
    {{#  }  }}
    {{#  if(d.planType == '3,'){ }}
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="terminalEdit">末端治理</a>
    {{#  }  }}
    {{#  }  }}

    <!--选2个-->
    {{#  if(d.planType.length == 4){ }}
    {{#  if(d.planType == '1,2,'){ }}
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="sourceEdit">源头替代</a>
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="processEdit">过程控制</a>
    {{#  }  }}
    {{#  if(d.planType == '2,3,'){ }}
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="processEdit">过程控制</a>
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="terminalEdit">末端治理</a>

    {{#  }  }}
    {{#  if(d.planType == '1,3,'){ }}
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="sourceEdit">源头替代</a>
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="terminalEdit">末端治理</a>
    {{#  }  }}
    {{#  }  }}





</script>
<script type="text/html" id="statusTpl">
    <input type="checkbox" lay-filter="delFlag" value="{{d.id}}" lay-skin="switch" lay-text="启用|禁用" {{d.delFlag==1?'checked':''}} />
</script>
@}